Terminate-and-stay-resident program